package com.own.demo;

import org.junit.jupiter.api.Test;

/**
 * @Author zyf
 * @Date 2025-06-03 17:47
 * Description:
 * @Version 1.0
 */
public class OtherBDemo {


    @Test
    public void test() throws Exception {

        String day = "1";

        switch (day) {
            case "1", "2" -> System.out.println("1111111");
            case "3" -> System.out.println("1");
            default -> throw new Exception("错了");
        }


        Object d = new Object();
        if (d instanceof String s) {
            System.out.println(s.toString());
        }

    }

}
